package com.ittony.service.impl;

import com.ittony.entity.SetMeal;
import com.ittony.mapper.SetMealMapper;
import com.ittony.service.SetMealService;
import com.ittony.vo.DishItemVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SetMealServiceImpl implements SetMealService {
    @Autowired
    private SetMealMapper setMealMapper;

    @Override
    public List<SetMeal> listByCategoryId(SetMeal setMeal) {
       List<SetMeal> setMealList = setMealMapper.listByCategoryId(setMeal);

       return setMealList;
    }

    @Override
    public List<DishItemVO> getDishItemById(Long id) {
        return setMealMapper.getDishItemBySetmealId(id);
    }
}
